<template>
  <div class="body">
    <div class="body_left">
      <BaseMenu
        :menuList="bodyLeft"
        :chidrenShow="chidrenShow"
        :chidrenShowTwo="chidrenShowTwo"
        @go="go"
      />
    </div>
    <div class="body_right">
      <!-- <el-card> -->
      <router-view></router-view>
      <!-- </el-card> -->
    </div>
  </div>
</template>

<script>
import BaseMenu from '@/components/baseMenu/baseMenu'

export default {
  name: 'index',
  components: {
    BaseMenu
  },
  data() {
    return {
      bodyLeft: [
        {
          path: '/wisdomIndustry/WisdomIndustryOverview',
          title: '产业看板',
          icon: 'xiangmukanban',
          id: 491
        },
        {
          path: '/wisdomIndustry/IndustryInfoManagement',
          title: '产业信息管理',
          icon: 'zhcy-cyxxgl',
          id: 492,
          children: [
            {
              path: '/wisdomIndustry/IndustryInfoManagement/ConsumerElectronics',
              title: '消费电子',
              icon: 'zhcy-xfdz',
              id: 4921
            },
            {
              path: '/wisdomIndustry/IndustryInfoManagement/IntelligentConnectedVehicle',
              title: '智能网联汽车',
              icon: 'zhcy-znwlqc',
              id: 4922
            },
            {
              path: '/wisdomIndustry/IndustryInfoManagement/Aerospace',
              title: '航空航天',
              icon: 'zhcy-hkht',
              id: 4923
            },
            {
              path: '/wisdomIndustry/IndustryInfoManagement/PrecisionApparatus',
              title: '精密仪器制造',
              icon: 'zhcy-jmyqzz',
              id: 4924
            },
            {
              path: '/wisdomIndustry/IndustryInfoManagement/ArtificiallyIntelligent',
              title: '人工智能机器人',
              icon: 'zhcy-rgznjq',
              id: 4925
            }
          ]
        },
        {
          path: '/wisdomIndustry/EnterpriseInfoManagement',
          title: '企业信息管理',
          icon: 'zhcy-qyxxgl',
          id: 493,
          children: [
            {
              path: '/wisdomIndustry/EnterpriseInfoManagement/MarketSubjectCultivation',
              title: '市场主体培育管理',
              icon: 'zhcy-scztpygl',
              id: 4931
            },
            {
              path: '/wisdomIndustry/EnterpriseInfoManagement/MarketSubjectRegistration',
              title: '仅注册企业管理',
              icon: 'zhcy-scztzcgl',
              id: 4932
            },
            {
              path: '/wisdomIndustry/EnterpriseInfoManagement/LeasingVenueEnterprises',
              title: '租赁场地企业管理',
              icon: 'zhcy-zpcdqygl',
              id: 4933
            },
            {
              path: '/wisdomIndustry/EnterpriseInfoManagement/SelfBuiltSiteEnterprise',
              title: '自建场地企业管理',
              icon: 'zhcy-zjcdqygl',
              id: 4934
            }
          ]
        },
        {
          path: '/wisdomIndustry/KeyProjectManagement',
          title: '区重点项目管理',
          icon: 'zhcy-qzdxmgl',
          id: 494
        },
        {
          path: '/wisdomIndustry/FixedInvestmentTarget',
          title: '固投目标作战图',
          icon: 'zhcy-gtmbzzt',
          id: 496
        },
        {
          path: '/wisdomIndustry/PolicyCalculator',
          title: '政策计算器',
          icon: 'zhcy-zcjsq',
          id: 495,
          children: [
            {
              path: '/wisdomIndustry/PolicyCalculator/PolicyManage',
              title: '政策管理',
              icon: 'zhcy-zcgl',
              id: 4951
            },
            {
              path: '/wisdomIndustry/PolicyCalculator/PolicyMate',
              title: '政策匹配',
              icon: 'zhcy-zcpp',
              id: 4951
            }
          ]
        }
      ],
      chidrenShow: true,
      chidrenShowTwo: false
    }
  },
  computed: {
    routerPath() {
      return this.$route.path
    }
  },
  methods: {
    // 路由跳转
    go(path) {
      if (path.indexOf('/wisdomIndustry') > -1) {
        this.$router.push(path)
        this.chidrenShow = false
      } else if (path === 'rizhi') {
        this.chidrenShowTwo = !this.chidrenShowTwo
      }
    }
  }
}
</script>

<style scoped lang="scss">
.body {
  color: #000;
  height: calc(100vh - 60px);
  width: 100%;
  display: flex;

  &_left {
    width: 296px;
    height: 100%;

    .item {
      width: 100%;
      height: auto;
      text-align: left;
      // padding-left: 22px;
      font-size: 14px;
      font-family: PingFang SC;
      font-weight: 500;
      color: #4c565c;
      line-height: 50px;

      :hover {
        cursor: pointer;
      }
    }

    .activeItem {
      //background: red;
      background: rgba(234, 245, 253, 1);
      border-right: 3px solid #4a80a3;
      color: #497fa3;
      //color: #EAF5FD;
    }
  }

  &_right {
    display: flex;
    width: calc(100% - 296px);
    height: 100%;
    background: #eff3f9;

    .el-card {
      width: 100%;
      margin: 15px;
    }
  }
}
</style>
